using UnityEngine;

namespace Enemy
{
    public class DeathState : IState
    {
        public DeathState(FSM manager)
        {
            this.manager = manager;
            this.parameter = manager.parameter;
        }
        public override void OnEnter()
        {
            parameter.animator.Play("Dead");
            parameter.rb.velocity = Vector2.zero;
            
        }

        public override void OnUpdate()
        {
            // // 如果动画播放进度超过95%，销毁敌人
            // if (parameter.animatorStateInfo.normalizedTime >= 0.95f)
            // {
            //     manager.Destroy();
            // }
        }

        public override void OnFixedUpdate()
        {

        }

        public override void OnExit()
        {

        }

    }
}
